const   fs=require("fs");


var   asyncFunc2=async function(){
    var  aa=await new  Promise(function(resolve,reject){
        fs.readFile("./aa.txt","utf8",(err,data)=>{
            resolve(data);
        })
    })
     console.log(aa,888);
    

    var  bb=await fs.readFile("./bb.txt","utf8",(err,data)=>{
        //console.log(data,7777); 
    })
    return  aa+bb;
}

asyncFunc2()


// async function  asyncFunc(){

//     var  aa=await new  Promise(function(resolve,reject){
//         fs.readFile("./aa.txt","utf8",(err,data)=>{
//             resolve(data);
//         })
//     })
//      console.log(aa,888);
    

//     var  bb=await fs.readFile("./bb.txt","utf8",(err,data)=>{
//         //console.log(data,7777); 
//     })
//     return  aa+bb;
// }

// asyncFunc()
   
